'''
Author: xialang333@gmail.com
Date: 2025-08-04 14:33:02
LastEditTime: 2025-08-04 16:40:42
'''
from sqlalchemy import Column, Integer, String, Boolean, JSON
from app.database import Base

class DBExporter(Base):
    __tablename__ = "exporters"

    id = Column(Integer, primary_key=True, index=True)
    name = Column(String, unique=True, index=True)
    type = Column(String)
    host = Column(String)
    port = Column(Integer)
    path = Column(String, default="/metrics")
    enabled = Column(Boolean, default=True)
    scrape_interval = Column(Integer, default=15)
    labels = Column(JSON, default={})